3.90 \(\int \frac{(2-x-2 x^2+x^3) (d+e x+f x^2+g x^3+h x^4+i x^5)}{(4-5 x^2+x^4)^2} \, dx\)

Optimal. Leaf size=122 \[ \frac{d-2 e+4 f-8 g+16 h-32 i}{12 (x+2)}-\frac{1}{18} \log (1-x) (d+e+f+g+h+i)+\frac{1}{48} \log (2-x) (d+2 e+4 f+8 g+16 h+32 i)+\frac{1}{6} \log (x+1) (d-e+f-g+h-i)-\frac{1}{144} \log (x+2) (19 d-26 e+28 f-8 g-80 h+352 i)+i x \]

[Out]

i*x + (d - 2*e + 4*f - 8*g + 16*h - 32*i)/(12*(2 + x)) - ((d + e + f + g + h + i)*Log[1 - x])/18 + ((d + 2*e +
 4*f + 8*g + 16*h + 32*i)*Log[2 - x])/48 + ((d - e + f - g + h - i)*Log[1 + x])/6 - ((19*d - 26*e + 28*f - 8*g
 - 80*h + 352*i)*Log[2 + x])/144

________________________________________________________________________________________

Rubi [A]  time = 0.314953, antiderivative size = 122, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 51, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.039, Rules used = {1586, 6742} \[ \frac{d-2 e+4 f-8 g+16 h-32 i}{12 (x+2)}-\frac{1}{18} \log (1-x) (d+e+f+g+h+i)+\frac{1}{48} \log (2-x) (d+2 e+4 f+8 g+16 h+32 i)+\frac{1}{6} \log (x+1) (d-e+f-g+h-i)-\frac{1}{144} \log (x+2) (19 d-26 e+28 f-8 g-80 h+352 i)+i x \]

Antiderivative was successfully verified.

[In]

Int[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5))/(4 - 5*x^2 + x^4)^2,x]

[Out]

i*x + (d - 2*e + 4*f - 8*g + 16*h - 32*i)/(12*(2 + x)) - ((d + e + f + g + h + i)*Log[1 - x])/18 + ((d + 2*e +
 4*f + 8*g + 16*h + 32*i)*Log[2 - x])/48 + ((d - e + f - g + h - i)*Log[1 + x])/6 - ((19*d - 26*e + 28*f - 8*g
 - 80*h + 352*i)*Log[2 + x])/144

Rule 1586

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin{align*} \int \frac{\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+90 x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac{d+e x+f x^2+g x^3+h x^4+90 x^5}{(2+x)^2 \left (2-x-2 x^2+x^3\right )} \, dx\\ &=\int \left (90+\frac{2880+d+2 e+4 f+8 g+16 h}{48 (-2+x)}+\frac{-90-d-e-f-g-h}{18 (-1+x)}+\frac{-90+d-e+f-g+h}{6 (1+x)}+\frac{2880-d+2 e-4 f+8 g-16 h}{12 (2+x)^2}+\frac{-31680-19 d+26 e-28 f+8 g+80 h}{144 (2+x)}\right ) \, dx\\ &=90 x-\frac{2880-d+2 e-4 f+8 g-16 h}{12 (2+x)}-\frac{1}{18} (90+d+e+f+g+h) \log (1-x)+\frac{1}{48} (2880+d+2 e+4 f+8 g+16 h) \log (2-x)-\frac{1}{6} (90-d+e-f+g-h) \log (1+x)-\frac{1}{144} (31680+19 d-26 e+28 f-8 g-80 h) \log (2+x)\\ \end{align*}

Mathematica [A]  time = 0.0703025, size = 118, normalized size = 0.97 \[ \frac{1}{144} \left (\frac{12 (d-2 (e-2 f+4 g-8 h+16 i))}{x+2}-8 \log (1-x) (d+e+f+g+h+i)+3 \log (2-x) (d+2 e+4 (f+2 g+4 h+8 i))+24 \log (x+1) (d-e+f-g+h-i)+\log (x+2) (-19 d+26 e-28 f+8 g+80 h-352 i)+144 i x\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5))/(4 - 5*x^2 + x^4)^2,x]

[Out]

(144*i*x + (12*(d - 2*(e - 2*f + 4*g - 8*h + 16*i)))/(2 + x) - 8*(d + e + f + g + h + i)*Log[1 - x] + 3*(d + 2
*e + 4*(f + 2*g + 4*h + 8*i))*Log[2 - x] + 24*(d - e + f - g + h - i)*Log[1 + x] + (-19*d + 26*e - 28*f + 8*g
+ 80*h - 352*i)*Log[2 + x])/144

________________________________________________________________________________________

Maple [A]  time = 0.011, size = 221, normalized size = 1.8 \begin{align*} -{\frac{19\,\ln \left ( 2+x \right ) d}{144}}+{\frac{13\,\ln \left ( 2+x \right ) e}{72}}+{\frac{\ln \left ( 1+x \right ) d}{6}}-{\frac{\ln \left ( 1+x \right ) e}{6}}+{\frac{\ln \left ( x-2 \right ) d}{48}}+{\frac{\ln \left ( x-2 \right ) e}{24}}-{\frac{\ln \left ( x-1 \right ) d}{18}}-{\frac{\ln \left ( x-1 \right ) e}{18}}-{\frac{8\,i}{6+3\,x}}+{\frac{4\,h}{6+3\,x}}-{\frac{2\,g}{6+3\,x}}+{\frac{d}{24+12\,x}}-{\frac{e}{12+6\,x}}+{\frac{f}{6+3\,x}}+{\frac{2\,\ln \left ( x-2 \right ) i}{3}}-{\frac{\ln \left ( x-1 \right ) i}{18}}-{\frac{22\,\ln \left ( 2+x \right ) i}{9}}-{\frac{\ln \left ( 1+x \right ) i}{6}}+{\frac{\ln \left ( 2+x \right ) g}{18}}-{\frac{\ln \left ( 1+x \right ) g}{6}}+{\frac{\ln \left ( x-2 \right ) g}{6}}-{\frac{\ln \left ( x-1 \right ) g}{18}}+{\frac{5\,\ln \left ( 2+x \right ) h}{9}}+{\frac{\ln \left ( 1+x \right ) h}{6}}+{\frac{\ln \left ( x-2 \right ) h}{3}}-{\frac{\ln \left ( x-1 \right ) h}{18}}+{\frac{\ln \left ( x-2 \right ) f}{12}}-{\frac{\ln \left ( x-1 \right ) f}{18}}-{\frac{7\,\ln \left ( 2+x \right ) f}{36}}+{\frac{\ln \left ( 1+x \right ) f}{6}}+ix \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x)

[Out]

-19/144*ln(2+x)*d+13/72*ln(2+x)*e+1/6*ln(1+x)*d-1/6*ln(1+x)*e+1/48*ln(x-2)*d+1/24*ln(x-2)*e-1/18*ln(x-1)*d-1/1
8*ln(x-1)*e-8/3/(2+x)*i+4/3/(2+x)*h-2/3/(2+x)*g+1/12/(2+x)*d-1/6/(2+x)*e+1/3/(2+x)*f+2/3*ln(x-2)*i-1/18*ln(x-1
)*i-22/9*ln(2+x)*i-1/6*ln(1+x)*i+1/18*ln(2+x)*g-1/6*ln(1+x)*g+1/6*ln(x-2)*g-1/18*ln(x-1)*g+5/9*ln(2+x)*h+1/6*l
n(1+x)*h+1/3*ln(x-2)*h-1/18*ln(x-1)*h+1/12*ln(x-2)*f-1/18*ln(x-1)*f-7/36*ln(2+x)*f+1/6*ln(1+x)*f+i*x

________________________________________________________________________________________

Maxima [A]  time = 0.952286, size = 146, normalized size = 1.2 \begin{align*} i x - \frac{1}{144} \,{\left (19 \, d - 26 \, e + 28 \, f - 8 \, g - 80 \, h + 352 \, i\right )} \log \left (x + 2\right ) + \frac{1}{6} \,{\left (d - e + f - g + h - i\right )} \log \left (x + 1\right ) - \frac{1}{18} \,{\left (d + e + f + g + h + i\right )} \log \left (x - 1\right ) + \frac{1}{48} \,{\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} \log \left (x - 2\right ) + \frac{d - 2 \, e + 4 \, f - 8 \, g + 16 \, h - 32 \, i}{12 \,{\left (x + 2\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="maxima")

[Out]

i*x - 1/144*(19*d - 26*e + 28*f - 8*g - 80*h + 352*i)*log(x + 2) + 1/6*(d - e + f - g + h - i)*log(x + 1) - 1/
18*(d + e + f + g + h + i)*log(x - 1) + 1/48*(d + 2*e + 4*f + 8*g + 16*h + 32*i)*log(x - 2) + 1/12*(d - 2*e +
4*f - 8*g + 16*h - 32*i)/(x + 2)

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**3-2*x**2-x+2)*(i*x**5+h*x**4+g*x**3+f*x**2+e*x+d)/(x**4-5*x**2+4)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.08429, size = 158, normalized size = 1.3 \begin{align*} i x - \frac{1}{144} \,{\left (19 \, d + 28 \, f - 8 \, g - 80 \, h + 352 \, i - 26 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac{1}{6} \,{\left (d + f - g + h - i - e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac{1}{18} \,{\left (d + f + g + h + i + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac{1}{48} \,{\left (d + 4 \, f + 8 \, g + 16 \, h + 32 \, i + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) + \frac{d + 4 \, f - 8 \, g + 16 \, h - 32 \, i - 2 \, e}{12 \,{\left (x + 2\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="giac")

[Out]

i*x - 1/144*(19*d + 28*f - 8*g - 80*h + 352*i - 26*e)*log(abs(x + 2)) + 1/6*(d + f - g + h - i - e)*log(abs(x
+ 1)) - 1/18*(d + f + g + h + i + e)*log(abs(x - 1)) + 1/48*(d + 4*f + 8*g + 16*h + 32*i + 2*e)*log(abs(x - 2)
) + 1/12*(d + 4*f - 8*g + 16*h - 32*i - 2*e)/(x + 2)